package com.anpxd.erpad.ui

import android.content.Intent
import android.os.Bundle
import com.anpxd.erpad.App
import com.anpxd.erpad.R
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity

/**
 *  Creator : GG
 *  Time    : 2017/11/13
 *  Mail    : gg.jin.yu@gmail.com
 *  Explain : 闪屏页
 */
class SplashActivity : RxAppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        setTheme(R.style.AppTheme)
        super.onCreate(savedInstanceState)
//        Handler().postDelayed({
        val intent: Intent = if (App.instance.getUser() == null)
            Intent(this, LoginActivity::class.java)
        else {
            Intent(this, MainActivity::class.java)
        }
        startActivity(intent)
        finish()
//        }, 1000)

    }

}